<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.io.*" %>
<title>파일 읽기</title>
<%
	BufferedReader reader = null;
	try{
		String filePath = application.getRealPath("/WEB-INF/input.txt");
		reader = new BufferedReader(new FileReader(filePath));
		while(true){
			String str = reader.readLine();
			if(str == null) break;
			out.println(str + "<br>");
		}
	}catch(FileNotFoundException e){
		out.println("파일이 없습니다.");
	}catch(IOException e){
		out.println("파일을 읽지 못합니다.");
	}finally{
		try{reader.close();} catch(Exception e){}
	}
%>








